package com.yilin.tms.core.entity.user.account;

import java.io.Serializable;

public class UserAccrual implements Serializable {

    //（司机）被评累计
    private int diffGoodAppraiseCount = 0; //好评 4-5
    private int diffMidAppraiseCount = 0;//中评 2.5-3.5
    private int diffBadAppraiseCount = 0;//差评 1 2
    private int diffComplaintsCount = 0;//被投诉
    private int diffArbitrationCount = 0;//仲裁惩罚
    private int diffViolationCount = 0;//违规

    public static UserAccrual appraiseAccrual(double appraise){
        UserAccrual userAccrual = new UserAccrual();
        if (appraise >= 4.0) userAccrual.setDiffGoodAppraiseCount(1);
        else if (appraise >= 2.5) userAccrual.setDiffMidAppraiseCount(1);
        else  userAccrual.setDiffBadAppraiseCount(1);
        return userAccrual;
    }

    public static UserAccrual goodAppraiseAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffGoodAppraiseCount(1);
        return userAccrual;
    }

    public static UserAccrual midAppraiseAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffMidAppraiseCount(1);
        return userAccrual;
    }
    public static UserAccrual badAppraiseAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffBadAppraiseCount(1);
        return userAccrual;
    }
    public static UserAccrual complaintsAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffComplaintsCount(1);
        return userAccrual;
    }
    public static UserAccrual arbitrationAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffArbitrationCount(1);
        return userAccrual;
    }
    public static UserAccrual violationAccrual(){
        UserAccrual userAccrual = new UserAccrual();
        userAccrual.setDiffViolationCount(1);
        return userAccrual;
    }

    public int getDiffGoodAppraiseCount() {
        return diffGoodAppraiseCount;
    }

    public void setDiffGoodAppraiseCount(int diffGoodAppraiseCount) {
        this.diffGoodAppraiseCount = diffGoodAppraiseCount;
    }

    public int getDiffMidAppraiseCount() {
        return diffMidAppraiseCount;
    }

    public void setDiffMidAppraiseCount(int diffMidAppraiseCount) {
        this.diffMidAppraiseCount = diffMidAppraiseCount;
    }

    public int getDiffBadAppraiseCount() {
        return diffBadAppraiseCount;
    }

    public void setDiffBadAppraiseCount(int diffBadAppraiseCount) {
        this.diffBadAppraiseCount = diffBadAppraiseCount;
    }

    public int getDiffComplaintsCount() {
        return diffComplaintsCount;
    }

    public void setDiffComplaintsCount(int diffComplaintsCount) {
        this.diffComplaintsCount = diffComplaintsCount;
    }

    public int getDiffArbitrationCount() {
        return diffArbitrationCount;
    }

    public void setDiffArbitrationCount(int diffArbitrationCount) {
        this.diffArbitrationCount = diffArbitrationCount;
    }

    public int getDiffViolationCount() {
        return diffViolationCount;
    }

    public void setDiffViolationCount(int diffViolationCount) {
        this.diffViolationCount = diffViolationCount;
    }
}
